<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="utf-8">
    <link rel="stylesheet" href="../javascripts/lib/jqm/jquery.mobile-1.4.3.min.css"/>
    <link rel="stylesheet" href="../stylesheets/main.css"/>
    <script src="../javascripts/lib/jq/jquery-2.1.1.min.js"></script>
    <script src="../javascripts/lib/jqm/jquery.mobile-1.4.3.min.js"></script>
    <script type="text/javascript" charset="utf-8">
    // $(document).ready(function(){
    // $("#listview").listview({splitIcon: "star" });
    // });
    </script>

    <title><%=title%></title>
  </head>
  <body>
    <div class="a" data-role="page" id="page">

      <div data-role="header" id="header">
      </div>
      <div data-role="content" data-theme="c" >
          <script type="text/javascript">
              function ttt(){
                  alert('ssssssssssssss');
                  WeixinJSBridge.invoke('getBrandWCPayRequest',<%-payinfo%>,function(res){
                      alert(res.err_msg);
                      if(res.err_msg=="get_brand_wcpay_request:ok"){
                          $("#wcpayend").click();
                      }
                  });
              }
          </script>
          <ul id="listview" data-role="listview" data-inset="true">
          <%goods.forEach(function(good){%>
            <li>
              <div class="gridrow">
                <img src="../images/goods.png" alt=""/>
                <label style="overflow:hidden;text-overflow:ellipsis;"><%=good.name%></label>
                <label>价格：￥<%=good.price%></label>
                <a href="/wcpay/goodslist?goodid=<%=good._id%>" data-role="button" class="btnBack">购买</a>
              </div>
            </li>
          <%});%>
          </ul>
      </div>
        <input type="button" name="" id="wcpay" value="微信支付vvaaa" onclick="ttt();">
    </div>

  </body>
</html>